# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-xml-twig
pkgver=3.52
pkgrel=11
pkgdesc="A module for easy processing of XML"
arch=('any')
url="https://search.cpan.org/dist/XML-Twig/"
license=('GPL' 'PerlArtistic')
depends=('perl-xml-parser' 'perl-text-iconv' 'perl')
checkdepends=('perl-libwww' 'perl-test-pod' 'perl-xml-simple' 'perl-html-tree' 'perl-xml-xpath' 'perl-tie-ixhash')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/M/MI/MIROD/XML-Twig-${pkgver}.tar.gz")
sha256sums=('fef75826c24f2b877d0a0d2645212fc4fb9756ed4d2711614ac15c497e8680ad')

build() {
  cd XML-Twig-${pkgver}
  perl Makefile.PL -y INSTALLDIRS=vendor
  make
}

check() {
  cd XML-Twig-${pkgver}
  make test || warning "Tests failed"
}

package() {
  cd XML-Twig-${pkgver}
  make DESTDIR="${pkgdir}" install
}
